home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
DJGPP
/
CBGRX103.ZIP
/
contrib
/
libgrx
/
test
/
linetest.c
< prev
next >
Wrap
Text File
|
1993-12-06
|
2KB
|
79 lines
/**
** LINETEST.C
**
** Copyright (C) 1992, Csaba Biegl
** 820 Stirrup Dr, Nashville, TN, 37221
** csaba@vuse.vanderbilt.edu
**
** This file is distributed under the terms listed in the document
** "copying.cb", available from the author at the address above.
** A copy of "copying.cb" should accompany this file; if not, a copy
** should be available from where this file was obtained. This file
** may not be distributed without a verbatim copy of "copying.cb".
** You should also have received a copy of the GNU General Public
** License along with this program (it is in the file "copying");
** if not, write to the Free Software Foundation, Inc., 675 Mass Ave,
** Cambridge, MA 02139, USA.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**/
#include "test.h"
TESTFUNC(test1)
{
GrLineOption o1,o2,o3,o4;
o1.lno_color = GrAllocColor(255,0,0);
o1.lno_width = 1;
o1.lno_pattlen = 4;
o1.lno_dashpat = "\5\5\24\24";
o2.lno_color = GrAllocColor(255,255,0);
o2.lno_width = 2;
o2.lno_pattlen = 6;
o2.lno_dashpat = "\5\5\24\24\2\2";
o3.lno_color = GrAllocColor(0,255,255);
o3.lno_width = 30;
o3.lno_pattlen = 8;
o3.lno_dashpat = "\5\5\24\24\2\2\40\40";
o4.lno_color = GrAllocColor(255,0,255);
o4.lno_width = 4;
o4.lno_pattlen = 6;
o4.lno_dashpat = "\2\2\2\2\10\10";
GrCustomLine(10,10,100,100,&o1);
GrCustomLine(10,50,100,140,&o1);
GrCustomLine(10,90,100,180,&o1);
GrCustomLine(110,10,200,100,&o2);
GrCustomLine(110,50,200,140,&o2);
GrCustomLine(110,90,200,180,&o2);
GrCustomLine(210,10,300,100,&o3);
GrCustomLine(210,50,300,140,&o3);
GrCustomLine(210,90,300,180,&o3);
GrCustomLine(20,300,600,300,&o4);
GrCustomLine(20,320,600,340,&o4);
GrCustomLine(20,380,600,360,&o4);
GrCustomLine(400,100,400,300,&o4);
GrCustomLine(420,100,440,300,&o4);
GrCustomLine(480,100,460,300,&o4);
GrCustomLine(600,200,500,300,&o4);
getkey();
GrClearScreen(GrBlack());
GrCustomBox(50,50,550,350,&o3);
GrCustomCircle(300,200,50,&o2);
getkey();
}